package com.training.food.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.training.food.Domain.Confirmslauger;
import com.training.food.Domain.HisOrder;
import com.training.food.Domain.Release;
import com.training.food.pojo.Initialpur;
import com.training.food.pojo.Retail;
import com.training.food.pojo.User;
import com.training.food.pojo.WSmarket;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

@Repository
@Mapper
public interface WSmarketMapper extends BaseMapper<WSmarket> {
    WSmarket select(WSmarket wsmarket);
    int insert(WSmarket wsmarket);
    void delete(WSmarket wsmarket);
    void update(WSmarket wsmarket);
    List<WSmarket> thelist(List<Initialpur> initialpur );
    List<WSmarket>selectByUser(@Param("username")String username, @Param("state")String state, @Param("description")String description);
    List<WSmarket>selectAll(String state);
    List<WSmarket>selectAllByNULL(@Param("tmp") String tmp);
    //    更新交易状态
    void updateState(@Param("wsid") int wsid,@Param("state") String state);
    //接收订单时对应批次的数量更新
    void updateConfirm(@Param("cs") List<Confirmslauger> cs);
    //添加订单
    void addReleaseOrder(@Param("contain") Release release, @Param("user") User user, @Param("state") char state);
    //展示所有历史订单
    List<HisOrder> allReleaseShow(@Param("user") User user, @Param("states")List<String> states);
    //ZZM获取状态为3的数量
    int get3num();
}
